<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="{{__PUBLIC__}}/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="{{__PUBLIC__}}/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="{{__PUBLIC__}}/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="{{__PUBLIC__}}/Admin/Flat/img/favicon.ico">
	    
	</head>
	<style type="text/css">
	*{
		margin: 0;padding: 0;
		text-align: center;
		font-size: 15px;
	}
	#case{
		width:800px;
		margin: 0 auto;
	}
	li{
		list-style: none;
		width:100px;height:100px;
		float: left;
	}
	th{text-align: center;
	   vertical-align:middle;
	}
	</style>
	<body>
	<div class="container-fluid">
		<div class="span12">
		<a href="javascript:;" class="btn btn-block btn-primary">商品列表</a><br>
		<table class="table table-bordered table-hover">
			<tr class="active">
			  <th width="">ID</th>
			  <th>商品名称</th>
			  <th>货号</th>
			  <th>单位</th>
              <th>市场价格</th>
              <th>商城价格</th>
               <th>总库存</th>
               <th >列表图</th>
               <th >点击次数</th>
               <th >上架时间</th>
               <th >更新时间</th>
			  <th width="220px">操作</th>
			</tr>

			{{foreach from="$goodsData" value="$v"}}
			<tr>
				<td>{{$v['gid']}}</td>
				<td>{{$v['gname']}}</td>
				<td>{{$v['gnumber']}}</td>
				<td>{{$v['unit']}}</td>
                <td>{{$v['marketprice']}}</td>
                <td>{{$v['shopprice']}}</td>
                <td>{{$v['totalinventory']}}</td>
                <td><img width="117" height="67" src="{{__ROOT__}}/{{$v['pic']}}" alt=""></td>
                <td>{{$v['click']}}</td>
                <td>{{date('y-m-d',$v['addtime'])}}</td>
                <td>{{date('y-m-d',$v['updatetime'])}}</td>
				<td>
                    <a href="{{U('GoodsList/index',array('gid'=>$v['gid']))}}" title="" class="btn btn-sm btn-primary">货品列表</a>
					<a href="{{U('Goods/edit',array('gid'=>$v['gid']))}}" class="btn btn-sm btn-warning">编辑</a>
					<a href="javascript:;" class="btn btn-sm btn-danger" onclick="if(confirm('确定删除吗？？')) location.href='{{U('Goods/del',array('gid'=>$v['gid']))}}'">删除</a>
				</td>
			</tr>
		{{endforeach}}
		</table>
		<div id="case">
			<!-- {{$page}} -->
		</div>
		</div>
		</div>
	</body>
</html>
